import { defineStore } from "pinia";
import config from "@/config";

const useSetStore = defineStore("set", {
  state: () => ({
    baseUrl: config.baseUrl,
		barHright: 50
  }),
  actions: {
    // 设置服务器地址
    setBaseUrl(url: any) {
      this.baseUrl = url
      uni.setStorageSync('tyUrl', url)
    },
		// 设置页面bar高度
		setBarHeight(height: number) {
		  this.barHright = height
		}
  },
});

export default useSetStore;
